﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _30让ComboBox控件添加图标
{
    public class ImageInfoClass: INotifyPropertyChanged
    {
        string _imagePath;
        /// <summary>
        /// 
        /// </summary>
        public string ImagePath
        {
            get { return _imagePath; }
            set { _imagePath = value;
                if (PropertyChanged != null)
                    this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("ImagePath"));
            }
        }

        string _text;
        public string Text
        {
            get { return _text; }
            set { _text = value;
                if (PropertyChanged != null)
                    this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Text"));
            }
        }

        /// <summary>
        /// 此事件继承于接口INotifyPropertyChanged
        /// 必须实现
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged;
    }
}
